package com.henghe.frame.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.henghe.frame.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2024/6/12 15:14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_log")
public class SysLog extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(required = true, dataType = "string", value = "接口方法名")
    private String optApi;

    @ApiModelProperty(required = true, dataType = "string", value = "操作名称")
    private String optName;

    //操作类型: 1.查询 2.新增 3.修改 4.删除 5.审核通过 6.审核拒绝
    private Integer optTypeId;

    // 1成功 2失败
    private Integer optResultType;

    // 请求方法
    private String requestMethod;

    // 请求路径
    private String paramsUrl;

    private String queryString;
    // 请求参数
    private String paramsBody;

    @ApiModelProperty(required = true, dataType = "string", value = "日志内容")
    private String logDesc;

}
